{include file="common/header"}
<link href="/static/admin/css/other.css" rel="stylesheet">
<main class="lyear-layout-content">
    <div class="container-fluid">
        <div class="row ant-menu-submenu">
            <div class="col-lg-12 p10">
                <div class="card right-card">
                    <div class="right-card-header card-header mb0">
                        <h4>{:lang('user.service_group')}</h4>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="10%">{:lang('evalua.Their_customer_service')}</th>
                                    <th width="10%">{:lang('evalua.Subordinate_to_the_group')}</th>
                                    <th width="10%">{:lang('evalua.Belongs_to_the_customer')}</th>
                                    <th width="20%">{:lang('evalua.Evaluation_of')}</th>
                                    <th width="20%">{:lang('evalua.Writing_evaluation')}</th>
                                    <th width="10%">{:lang('evalua.Evaluation_of_time')}</th>
                                    <th width="8%">{:lang('public.operation')}</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $evaluation as $item}
                                    <tr>
                                        <td>{$item['cunick']}</td>
                                        <td>{$item['groups']}</td>
                                        <td>{$item['vs_nick']}</td>
                                        <td>{:getEvaluationOf($item['pjqk'])}</td>
                                        <td>{:__empty($item['wzpj'])}</td>
                                        <td>{:date('Y年m月d日 H:i',$item['add_time'])}</td>
                                        <td>
                                            <div class="btn-group">
                                                <a class="btn btn-xs btn-success" href="#!" data-id="{$item['id']}" id="del" data-toggle="tooltip" data-original-title="{:lang('public.delete')}">
                                                    <i class="iconfont icon-shanchu"></i>
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                {/foreach}
                                </tbody>
                            </table>
                        </div>
                        {$evaluation->render()|raw}
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
{include file="common/footer"}
<script type="text/javascript">
    let IM_config = {
        evadel: "{:adminUrl('admin/Evaluation/del')}",
    };

    $(function () {

        /**
         * 删除
         */
        $('.btn-group #del').click(function () {
            var obj = $(this);
            var data = {
                eid: obj.attr('data-id'),
            };
            $.post(IM_config.evadel, data ,function (r) {
                we_im_msg(r.data);
                if (r.code == 200) {
                    setTimeout(function() {
                        location.reload();
                    },1000);
                }
            });
        });

    });

</script>